function f() {
  
}

function ajaxRequest(url,data,type){
  var result = null;
  $.ajax({
    url: url,
    type:type,
    async: false,
    dateType:'json',
    beforeSend: function(xhr) {
      // xhr.setRequestHeader("token:'loginUser:0000:6fe072c8-9a15-40ae-b538-a2988feb143f'");
    },
    headers: {'Content-Type':'application/json;charset=utf8'},
    data:JSON.stringify(data),
    success:function(res){
      result = res;
    },
    error:function(jqXHR, textStatus, errorThrown){
      /*弹出jqXHR对象的信息*/
      // console.log(jqXHR.responseText);
      // console.log(jqXHR.status);
      // console.log(jqXHR.readyState);
      // console.log(jqXHR.statusText);
      /*弹出其他两个参数的信息*/
      // console.log(textStatus);
      console.log(errorThrown);
    }
  });
  return result;
}